# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=IO-HTML
pkgname=perl-${_realname}
pkgver=1.001
pkgrel=1
pkgdesc="Open an HTML file with automatic charset detection"
arch=('any')
url='https://metacpan.org/release/IO-HTML'
groups=('perl-modules')
depends=('perl')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/C/CJ/CJM/${_realname}-$pkgver.tar.gz)
sha256sums=('ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0')

build() {
  export PERL_MM_USE_DEFAULT=1 PERL_MM_OPT="INSTALLDIRS=vendor" \
    PERL_MB_OPT="--installdirs vendor"
  cd ${_realname}-$pkgver
  perl Makefile.PL
  make
}

check() {
  cd ${_realname}-$pkgver
  make test
}

package() {
  cd ${_realname}-$pkgver
  make DESTDIR="$pkgdir" install
}
